package com.ltkj.order.mapper;

import com.ltkj.order.domain.TicOrderDetails;
import com.ltkj.order.domain.dto.TicOrderDetailAddDTO;
import com.ltkj.order.domain.vo.OrderDetailsVo;
import com.ltkj.order.domain.vo.OrderVenuesDetailsListVo;
import com.ltkj.order.domain.vo.TicStockDateVo;
import com.ltkj.system.api.domain.AppletOrderDetailVo;
import com.ltkj.system.api.domain.OrderDetailQueryDTO;
import org.apache.ibatis.annotations.Param;

import java.math.BigDecimal;
import java.util.List;

/**
 * 订单详情Mapper接口
 * 
 * @author ruoyi
 * @date 2023-09-01
 */
public interface TicOrderDetailsMapper 
{
    /**
     * 查询订单详情
     * 
     * @param orderDetailsId 订单详情主键
     * @return 订单详情
     */
    public TicOrderDetails selectTicOrderDetailsByOrderDetailsId(Long orderDetailsId);

    /**
     * 查询订单详情列表
     * 
     * @param ticOrderDetails 订单详情
     * @return 订单详情集合
     */
    public List<TicOrderDetails> selectTicOrderDetailsList(TicOrderDetails ticOrderDetails);

    /**
     * 新增订单详情
     * 
     * @param ticOrderDetails 订单详情
     * @return 结果
     */
    public int insertTicOrderDetails(TicOrderDetails ticOrderDetails);

    /**
     * 修改订单详情
     * 
     * @param ticOrderDetails 订单详情
     * @return 结果
     */
    public int updateTicOrderDetails(TicOrderDetails ticOrderDetails);

    /**
     * 删除订单详情
     * 
     * @param orderDetailsId 订单详情主键
     * @return 结果
     */
    public int deleteTicOrderDetailsByOrderDetailsId(Long orderDetailsId);

    /**
     * 批量删除订单详情
     * 
     * @param orderDetailsIds 需要删除的数据主键集合
     * @return 结果
     */
    public int deleteTicOrderDetailsByOrderDetailsIds(Long[] orderDetailsIds);

    void insertBatch(@Param("list") List<TicOrderDetailAddDTO> ticOrderDetailAddDTOList,@Param("orderId") Long orderId,
                     @Param("username") String username,@Param("ticketStatus") String ticketStatus);

    void cancleOrderByOrderIds(@Param("orderIds")Long[] orderIds);

    List<OrderDetailsVo> selectTicOrderDetailByOrderId(Long orderId);
    List<OrderVenuesDetailsListVo> selectTicVencesOrderDetailByOrderId(Long orderId);

    BigDecimal selectTiSceniccPrice(@Param("ticConfigId") Long ticConfigId);

    BigDecimal selectTicAcivityPrice(@Param("ticConfigId")Long ticConfigId);

    String selectScenicPhone(@Param("orderId")Long orderId);

    String selectActivityPhone(@Param("orderId")Long orderId);

    String selectVenuesPhone(@Param("orderId")Long orderId);

    void updateTicOrderDetailsStatusByOrderId(@Param("orderId")Long orderId);

    void updateTicOrderDetailsStatus(@Param("orderId")Long orderId);

    TicStockDateVo selectTicStockDate(@Param("ticConfigId")Long ticConfigId);

    TicStockDateVo selectActStockDate(@Param("ticConfigId")Long ticConfigId);

    BigDecimal selectGoodsPrice(@Param("goodsId") Long goodsId);

    String selectShopStorePhone(@Param("orderId")Long orderId);

    /** 查询赛事报名费 */
    BigDecimal selectGameEntryFee(@Param("id") Long id);

    /** 根据业务主键和类型查询订单详情 */
    List<AppletOrderDetailVo> queryOrderDetail(OrderDetailQueryDTO queryDTO);
}
